package com.hmily.dubbo.provider.spi.ioc;

import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;

import java.util.HashMap;
import java.util.Map;

/**
 * <h1>测试 dubbo ioc 的类。</h1>
 *
 * @author hmilyylimh
 * ^_^
 * @version 0.0.1
 * ^_^
 * @date 2021-11-14
 */
public class TestDubboIocAction {

    public static void main(String[] args) {
        ExtensionLoader<HumanService> loader = ExtensionLoader.getExtensionLoader(HumanService.class);

        HumanService humanService = loader.getExtension("hmily");

        Map map = new HashMap();
        map.put("name", "hmily");
        URL url = new URL(null, null, 0, map);


        System.out.println(humanService.getName(url));
    }
}
